<?php

if($_SERVER['HTTP_X_REQUESTED_WITH'])
{
	$str = '';
	$page = empty($_GET['page'])?1:$_GET['page'];
	$len=5;
	$news = partion($page,'newscate',$len);
	$count = selectOne('newscate','1','count(*) as count')['count'];
	$str = partienRender($count,$len,$page);
	echo json_encode(array('table'=>$news,'render'=>$str));
	die;
}

$str = '';
$page = empty($_GET['page'])?1:$_GET['page'];
$len=5;
$news = partion($page,'newscate',$len);
$count = selectOne('newscate','1','count(*) as count')['count'];
$str = partienRender($count,$len,$page);



include('app/admin/newscate/html/index.html');
?>